package com.xhh.apis.adjust;

import com.xhh.model.adjust.dtos.GetAdjustDto;
import com.xhh.model.adjust.dtos.GetMajorDto;
import com.xhh.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "adjust-service")
public interface IAdjustClient {

    @GetMapping("/adjust/faulty/{faultyCode}")
    ResponseResult getFaultyByCode(@PathVariable("faultyCode") String faultyCode);

    @GetMapping("/adjust/major/{majorCode}")
    ResponseResult getMajorByCode(@PathVariable("majorCode") String majorCode);

    @GetMapping("/adjust/faultyList/{unityId}")
    ResponseResult getFaultyByUnityId(@PathVariable("unityId") Long unityId);

    @GetMapping("/adjust/major/getMajorByUidAndFid")
    ResponseResult getMajorByUidAndFid(@SpringQueryMap GetMajorDto dto);

    @GetMapping("/adjust/getAdjustByCode")
    ResponseResult getAdjustByCode(@SpringQueryMap GetAdjustDto dto);
}
